var menunav_index=$('#Menunav_Index');
var menunav_transaction=$('#Menunav_Transaction');
var menunav_news=$('#Menunav_News');
var menunav_ancillary=$('#Menunav_Ancillary');
var menunav_shipyard=$('#Menunav_Shipyard');
var menunav_magazine=$('#Menunav_Magazine');
var menunav_exhibition=$('#Menunav_Exhibition');
var menunav_chain=$('#Menunav_Chain');
	
if(window.location.hostname=='www.shipinall.cn')
{
	var locationArray=window.location.toString().split('/');
	var scriptName=locationArray[locationArray.length-1];
	
	if(scriptName=='index.html'||scriptName==''){
		menunav_index.attr('class','act_bg');
	}
	
	if(scriptName=='chain.html'){
		menunav_chain.attr('class','act_bg');
	}	
	
	if(scriptName=='magazine.html'){
		menunav_magazine.attr('class','act_bg');
	}
	if(scriptName=='dm.html'){
		menunav_magazine.attr('class','act_bg');
	}	
	if(scriptName=='ejournal.html'){
		menunav_magazine.attr('class','act_bg');
	}	
	
	if(scriptName=='shipyard.html'){
		menunav_shipyard.attr('class','act_bg');
	}	
	
	if(scriptName=='shipyard_ordersheet.html'){
		menunav_shipyard.attr('class','act_bg');
	}
	
	if(scriptName.indexOf('exec.php')!='-1')
	{
		var action;
		var reg=new RegExp("(^|&|\\?)action=([^&]*)(&|$)"),r; 
		if (r=scriptName.match(reg)){
			action=unescape(r[2]);
		}
		
		if(action=='shipyard_account_list'){
			menunav_shipyard.attr('class','act_bg');
		}
		
		if(action=='shipyard_ordersheet'){
			menunav_shipyard.attr('class','act_bg');
		}					
	}
			
	try
	{
		if(locationArray[3]=='shipyard'){
			menunav_shipyard.attr('class','act_bg');		
		}
	}	
	catch(e)
	{}
}
else
{
	if(window.location.hostname=='news.shipinall.cn'){
		menunav_news.attr('class','act_bg');						
	}
	else if(window.location.hostname=='ancillary.shipinall.cn'){
		menunav_ancillary.attr('class','act_bg');
	}
	else if(window.location.hostname=='expo.shipinall.cn'){
		menunav_exhibition.attr('class','act_bg');
	}		
}
